package com.ghc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient //开启注册中心客户端 （Eureka， nacos...）
//spring cloud Edgware版本之后就不需要添加了 建议添加
@EnableFeignClients // 开启Feign
public class AutodeliverApplication8102Nacos {

    public static void main(String[] args) {
        SpringApplication.run(AutodeliverApplication8102Nacos.class, args);
    }

    //使用restTemplate进行远程调用
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}
